/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: lenovo
 * Date: 2022-05-12
 * Time: 12:01
 */
class Dog{
    public String name;
    public int age;
    public String colour;

    public Dog(String name, int age, String colour) {
        this.name = name;
        this.age = age;
        this.colour = colour;
    }

    public void barks(){
        System.out.println(name+"wang~");
    }
    public void wag(){
        System.out.println(name+"摇尾巴");
    }
}

public class Test {
    public static void main1(String[] args) {
        Dog dog1 = new Dog("阿黄",2,"黄色");
        dog1.barks();
        dog1.wag();
    }

    public static void main(String[] args) {
        Data data1 = new Data(1897,5,6);
       data1.setYear(2002);
       //data1.getYear();
       data1.show();
    }
}
